package com.itheima.template2;

import java.util.Arrays;
import java.util.Objects;

public class Test {
    public static void main(String[] args) {
        method1(new CallBack() {
            @Override
            public void work() {
                System.out.println("哈哈哈哈");
                System.out.println("哈哈哈哈");
                System.out.println("哈哈哈哈");
            }
        });
    }

    public static void method1(CallBack callBack){
        System.out.println("写作文开头");
        callBack.work();
        System.out.println("结尾！！！");

        int[] arr = {1,2,3,4,5,8};
        int[] newInts = Arrays.copyOfRange(arr,2,4);//左开右闭
        System.out.println(Arrays.toString(newInts));


        Object elementData[] = null;

        Object[] newObj = Arrays.copyOf(elementData, 10);
        System.out.println(newObj);
    }


}
